package com.jcl.recruit.timer.resume;

import com.jcl.recruit.timer.resume.service.RecommendResumeTaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class RecommendResumeTask {

    private static final Logger logger = LoggerFactory.getLogger(RecommendResumeTask.class);

    @Autowired
    private RecommendResumeTaskService recommendResumeTaskService;

    /**
     * 8 点
     */
    @Scheduled(cron = "0 0 8 * * ?")
    public void pushScreenTask(){
        logger.info("pushScreenTask start ...");
        recommendResumeTaskService.sendMessageTask();
        logger.info("pushScreenTask end .");
    }

    /**
     * 21 点
     */
    @Scheduled(cron = "0 0 21 * * ?")
    public void pushDataTask(){
        logger.info("pushScreenTask start ...");
        recommendResumeTaskService.pushDataTask();
        logger.info("pushScreenTask end .");
    }
}
